package com.cloud.elm.mapper;

import com.cloud.elm.po.Food;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FoodMapper {

	@Select("select * from food where businessId=#{businessId} order by foodId")
	public List<Food> listFoodByBusinessId(String businessId);
	
	@Select("select * from food where foodId=#{foodId}")
	public Food getFoodById(Integer foodId);

    void addFoodByBusinessId(Food food);

	@Delete("delete from food where foodId = #{foodId}")
    void delFoodById(Integer foodId);

	void updateFoodById(Food food);
}
